<ion-view title="{{user.userType=='4' ? '旅馆登记' : '注册' }}">
  <ion-content overflow-scroll="true" padding="true" scroll="true" class="has-header">
    <form class="list" name="form" ng-submit="submit()" novalidate>
      <div class="list">
        <div class="item item-select" name="userType">
          <span class="input-div">用户类型</span>
          <select ng-options="userType.value as userType.label for userType in userTypes" name="userType"
                  bsy-form-validate="userTypeErrorTips" required
                  ng-model="user.userType"
                  ng-change="update(user.userType)">
            <option value="">请选择</option>
          </select>

        </div>


        <div class="item item-input">
          <span class="input-div">用户名</span>
          <input type="text" placeholder="必填" ng-model="user.loginName" bsy-form-validate="userNameErrorTips" required>
        </div>
        <div class="item item-input">
          <span class="input-div">登陆密码</span>
          <input type="password" placeholder="" ng-model="user.password" bsy-form-validate="passwordErrorTips" required>
        </div>
        <div class="item item-input">
          <span class="input-div">确认密码</span>
          <input type="password" placeholder="" ng-model="user.confirmPassword" id="confirmPassword"
                 bsy-form-validate="confirmPasswordErrorTips" required>
        </div>

        <div ng-repeat="tmpl in includeTmpls" ng-include="tmpl">

        </div>
        <button class="button button-positive button-block " check-form>

          <ANY ng-switch="user.userType">
            <ANY ng-switch-when="4">
              提交登记信息
            </ANY>
            <ANY ng-switch-default>
              注册
            </ANY>
          </ANY>

        </button>
      </div>

    </form>
  </ion-content>
</ion-view>
